package com.meila.cms.util;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;
import com.meila.cms.entity.Car;
import com.meila.cms.util.json.JsonUtil3;

 
public class ElFunctions {

	public static String toJsonString(Object obj){
        // 将java对象转换为json对象
		  String str  = JSONObject.toJSONString(obj).replaceAll("\"", "'");
		// String str  =  JsonUtil3.object2json(obj).replaceAll("\"", "'");
/*		 System.out.println(JSONObject.toJSONString(obj));
		 System.out.println(str);*/
        return str;
    }
	
public static void main(String[] args) {
	
	Car car=new Car();
	car.setUpdatetime(new Date());
	System.out.println(toJsonString(car));
}
}
